package edu.bistu.alumnus.web.action.front;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import edu.bistu.alumnus.manager.FrontUserManager;

/**
 * 前台用户相关操作
 * 
 * @author zjs
 */
@Controller
public class FrontUserAction {

	FrontUserManager frontUserManager;

	@Autowired
	public void setFrontUserManager(FrontUserManager frontUserManager) {
		this.frontUserManager = frontUserManager;
	}

	/**
	 * 用户注册页面的跳转
	 * 
	 * @return ModelAndView 注册页面registration.jsp
	 */
	@RequestMapping(value = "/registration", method = RequestMethod.GET)
	public ModelAndView Registration(
			@RequestParam(value = "userName", required = true) String userName) {

		System.out.println(frontUserManager.toString());

		return new ModelAndView("registration");
	}

	public ModelAndView Registration(
			@RequestParam(value = "userName", required = true) String userName,
			@RequestParam(value = "password", required = true) String password) {

		return null;
	}

}
